package cz.muni.fi.pb138.videoweb2013.backend;

import java.util.List;

/**
 *
 * @author Lenka
 */
public class Category {
    private String categoryName;
    private String categoryId;
    private List<String> header;
    
    /**
     * Constructor of Category
     * 
     * @param name              name of the category
     * @param id                id of the category
     * @param header            list of columns of this category
     */
    public Category(String name, String id, List<String> h)
    {
        categoryName = name;
        categoryId = id;
        header = h;
    }
    
    public String getCategoryName()
    {
        return categoryName;
    }
    public String getCategoryId()
    {
        return categoryId;
    }
    public List<String> getHeader()
    {
        return header;
    }
    public boolean equals(Object obj)
    {
        if (!(obj instanceof Category)) {
            return false;
        }
        if (obj == this) {
            return true;
        }
        Category other = (Category) obj;        
        return ((other.getCategoryId().equals(this.categoryId)) && (other.getCategoryName().equals(this.categoryName)) && (other.header.equals(this.header)) );
    }
    public int hashCode()
    {
        return categoryId.hashCode() + categoryName.hashCode() + header.hashCode();
    }
}
